<?php

class NTRSAuthAction extends NTRSAction {

    public function __construct ($request) {

        parent::__construct($request);

        if ($request->session->get('authenticated') !== true) {

            // Validate remember me hash if it exist
            $auth = new NTRSAuth($request);
            if (!$auth->authRememberMe()) {

                $request->session->set('nitrous_auth_refer_request_uri', $_SERVER['REQUEST_URI']);
                $request->redirect(NTRS_LOGIN_URL);

            }

        }

    }

}